/**
 * 
 */
package club325.webchat.database.hibernate.dao;

import java.sql.Timestamp;
import java.util.List;

import javax.servlet.ServletException;

import club325.webchat.database.hibernate.domain.UserStatistics;

/**
 * @author Sider
 *
 */
public interface UserStatisticsDAO
{
	/**
	 * save the info while a user login
	 * @param UserID
	 */
	public void UserLogin(UserStatistics userinfo);
	
	/**
	 * save the info while a user logout
	 * @param userinfo
	 * @throws ServletException 
	 */
	public void UserLogout(UserStatistics userinfo) throws ServletException;
	
	/**
	 * get the statistic info by logintime 
	 * @param StartTime
	 * @param EndTime
	 */
	public List<UserStatistics> GetLoginInfoList(Timestamp StartTime,Timestamp EndTime);
	
	/**
	 * get the statistic info by logouttime
	 * @param StartTime
	 * @param EndTime
	 * @return
	 */
	public List<UserStatistics> GetLogoutInfoList(Timestamp StartTime,Timestamp EndTime);
	
	/**
	 * Get the number of the User who has visited the website
	 * @return
	 */
	public int GetUserStatisticsCount();
	
	/**
	 * Get the number of the User who visited the website today
	 * @param StartTime
	 * @param Endtime
	 * @return
	 */
	public int GetUserStatisticsCount(Timestamp StartTime,Timestamp Endtime);
}
